<template>
  <div class="bigbox">
    <SharecomponentVue
      ref="shareItemRef"
      @jinrubianji="jinrubianji"
      @toEditPage="toEditPage"
      :officeOwnershipType="officeOwnershipType"
      @changeofficeOwnershipType="testyifenixang"
      @paixurule="paixurule"
      :officeFileType="3"
    >
    </SharecomponentVue>
  </div>
</template>
<script lang="ts" setup>
// 人物头像在下面 shareppt true自由编辑器

// 字体大小  shareToptitlesize
// 字体颜色  shareToptitlecolor
// 图标颜色  shareTopiconcolor
// 图标大小  shareTopiconsize
// 高亮颜色
// 搜索点击颜色  shareTopshousuo
// 排序hover列表  paixulistData

// 图表!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// 比例值 imgheight(图片高度) imgwidth(图片宽度)
// 一行的个数  sharelinumber
// 比例  shareproportion
// 间距 sharelimargin (一个值)
// hover传一个class,默认向上16px
// 标题文字大小  sharetitlefontsize
// 标题文字颜色  sharetitlecolor
// 标题居中方式  titlejustifyContent
// 图标大小  sharetitleiconfz
// 图标颜色  sharetitleiconcolor
// 重命名事件
// 列表!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

// 图片按钮插槽
// shareimgAnniu
// shareJiahao
import { reactive, ref } from "vue";
import SharecomponentVue from "./Sharecomponent.vue";
import { useRouter } from "vue-router";
// 测试已分享已接收切换
const officeOwnershipType = ref(3);
const testyifenixang = (i: any) => {
  officeOwnershipType.value = i;
};
// 排序列表
const officeSortRule = ref(1);
const paixurule = (i: any) => {
  officeSortRule.value = i + 1;
};
const router = useRouter();
const jinrubianji = (id: any, screen: any, name: any) => {
  router.push({
    path: "/ppt",
    query: {
      name: name,
      id: id,
    },
  });
};

const toEditPage = (item: any) => {
  console.log(item);
  if (item.item.ownerSharerList) {
    localStorage.setItem(
      "ownerSharerList",
      JSON.stringify(item.item.ownerSharerList)
    );
  }
  router.push({
    path: "/freeeditor",
    query: {
      name: item.officeTitle,
      id: item.item.officeMainId,
      officeId: item.officeId,
      wid: item.officeId,
      screen: item.screen,
    },
  });
};
const shareItemRef: any = ref(false);
const hideRightMenu = (falg: any) => {
  shareItemRef.value.hideRightMenu(false);
};
defineExpose({ hideRightMenu });
// 下载  传递整个右键对象
const xiazaipptx = () => {};
const xiazaipdfx = () => {};
const xiazaijpg = () => {};
</script>
<style lang="scss" scoped>
.bigbox {
  background: #22252c;
  border-radius: 30px;
  height: 100%;
  padding: 20px 0;
  // margin: 20px 20px 0 0;
  color: #7a8bbf;
  font-size: 18px;
}
</style>
